package com.xyj.dao.base;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * Created by 徐宇健 on 2015/2/11 0011.
 */
public interface BaseDaoI<T> {

    /*添加对象*/
    public Serializable save(T t);

    public  void update(T t);
    public  void delete(T t);
    public  void saveOrUpdate(T t);

    @Deprecated
    public T get(String hql, Object[] objs);

    public T get(String hql, Map<String, Object> params);

    @Deprecated
    public List<T> find(String hql);

    public List<T> find(String hql, Map<String, Object> params);

    public List<T> find(String hql, Map<String, Object> params, int startPage, int pageSize);

    public List<T> find(String hql, int startPage, int pageSize);

    public  Long  count(String hql);

    public  Long  count(String hql, Map<String, Object> params);
}
